import request from "@/api/request";
/**
 *首页搜索
 * @returns
 */
function indexaction(data) {
  return request({
    url: "search/indexaction",
    data,
  });
}
/**
 * 关键词搜索
 * @param {*} data
 * @returns
 */
function helperaction(data) {
  return request({
    url: "search/helperaction",
    data,
  });
}

/**
 * 保存到历史记录
 * @data
 * @returns
 */
function addhistoryaction(data) {
  return request({
    method: "post",
    url: "search/addhistoryaction",
    data,
  });
}
/**
 * 清空历史记录
 * @param {*} data
 * @returns
 */
function clearhistoryAction(data) {
  return request({
    method: "post",
    url: "search/clearhistoryAction",
    data,
  });
}

export { indexaction, helperaction, addhistoryaction, clearhistoryAction };
